<%@page import="org.apache.struts.action.ActionMessages"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<jsp:include page="js_css.jsp"></jsp:include>
<title>欢迎进入学生缴费系统</title>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<script>
	$(function() {
		$("#tabs").tabs();
	});	
	function checkRequired(form){
		var loginid = form.loginid.value;
		var pwd = form.pwd.value;
		if($.trim(loginid).length==0||$.trim(pwd).length==0){
			alert("请输入登录名和密码!");
			return false;
		}
		return true;
	}
</script>
</head>
<body>
	<div id="main">
		<div>
			<h2>请登录</h2>
		</div>
		<span style="color: red;">${error}</span>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1">教师登录</a>
				</li>
				<li><a href="#tabs-2">学生登录</a>
				</li>
			</ul>
			<div id="tabs-1">
				<form action="<%=basePath%>welcome.do" method="post" onsubmit="return checkRequired(this)">
					<table>
						<tr>
							<td>登录名：</td>
							<td><input type="text" name="loginid"/><input type="hidden" value="teacher" name="type"/></td>
						</tr>
						<tr>
							<td>密码：</td>
							<td><input type="password" name="pwd"/></td>
						</tr>
						<tr>
							<td><input type="submit" value="登录"/></td>
							<td><input type="reset" value="重置"/></td>
						</tr>
					</table>
				</form>
			</div>
			<div id="tabs-2">
				<form action="welcome.do" method="post" onsubmit="return checkRequired(this)">
					<table>
						<tr>
							<td>学号：</td>
							<td><input type="text" name="loginid"/><input type="hidden" value="student" name="type"/></td>
						</tr>
						<tr>
							<td>密码：</td>
							<td><input type="password" name="pwd"/></td>
						</tr>
						<tr>
							<td><input type="submit" value="登录"/></td>
							<td><input type="reset" value="重置"/></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</body>
</html>